#include "Problem.hpp"
#include "Algorithm.hpp"

void Problem::finalize_solution(SolverReturn status, Index n, const Number* x,
		const Number* z_L, const Number* z_U, Index m, const Number* g,
		const Number* lambda, Number obj_value IPOPT8_FINARGS) {

	if (Algorithm::solveWithIpopt && Algorithm::verboseLevel) {

		cout << "Solution:" << endl;
		for (int i = 0; i < n; i++) {
			cout << "x[" << i << "] = " << x[i] << endl;
		}

		cout << endl << "Constraint values:" << endl;
		for (int i = 0; i < m; i++) {
			cout << "g[" << i << "] = " << g[i] << endl;
		}
	}
}
